<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="keywords" content="琥珀川,琥珀川高清影视,在线电影,最新电影,高清电影,好看的电影,电影天堂,电影排行榜,电影下载,电影推荐" />
	<meta name="description" content="琥珀川·高清影视网 是全球最大的中文影视站点之一，拥有超多的中外文视频资源，提供用户最完美的观看体验。您可以便捷地找到最新、最热的互联网影视，更有丰富的视频榜单、多样的视频专题满足您不同的视频观看需求。琥珀川·高清影视网，你的私人影库。" />
	<link href="/css/style.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" language="javascript" src="/js/jquery-1.6.1.min.js"></script>
	<script type="text/javascript" language="javascript" src="/js/tool.js"></script>
	<title>琥珀川 · 高清影视网</title>
	<style type="text/css">
	<%--导航 Div--%>
	.navigationDiv{
		background-image:url(/image/system/backgroundChange.png);
		background-color:#E3E3E3;
		border-top:1px solid #E6E6E6;
		border-bottom:5px solid #CACACA;
		height:40px;
	}
	<%--导航 A--%>
	.navigationA{
		padding-top:10px;
		padding-bottom:14px;
		line-height:40px;
		font-size:16px;
		color:black;
		text-decoration:none;
		padding-left:15px;
		padding-right:15px;
	}
	.navigationA:hover{
		background-color:#09F;
		color:white;
		font-weight:bold;
	}
	<%--翻盖面板--%>
	.flipPanelDiv{
		display:none;
		height:400px;
		background-position:center 0px;
		background-repeat:no-repeat;
	}
	<%--小导航 Div--%>
	.smallNavigationDiv{
		border-right:1px solid #E5E5E5;
	}
	<%--小导航A--%>
	.smallNavigationA{
		line-height:25px;
		white-space:nowrap;
		font-size:12px;
		color:#333333;
		text-decoration:none;
	}
	.smallNavigationA:hover{
		color:#09F;
	}
	
	<%--电影Div--%>
	.movieDiv{
		margin-top:10px;
	}
	<%--电影Div 项Div--%>
	.movieDiv .itemDiv{
		padding-bottom:20px;
	}
	<%--电影Div 边框Div--%>
	.movieDiv .borderDiv{
		width:140px;
		border:1px solid #E9E9E9;
	}
	<%--电影Div 图标渐变Div--%>
	.movieDiv .logoChangeDiv{
		position:absolute;
		height:40px;
		bottom:0px;
		background-image:url(/image/system/logoChange.png);
	}
	<%--电影Div 名称A--%>
	.movieDiv .nameA{
		color:#444444;
		font-size:14px;
		font-weight:bold;
		text-decoration:none;
	}
	.movieDiv .nameA:hover{
		color:#09F;
	}
	<%--电影Div 别名A--%>
	.movieDiv .bynameA{
		color:#AAAAAA;
		font-size:12px;
		font-weight:bold;
		text-decoration:none;
	}
	.movieDiv .bynameA:hover{
		color:#09F;
	}
	</style>
</head>

<body>
<jsp:include page="/include/pageTop" flush="true"/>
<%--撑高度Div--%>
<div style="height:20px; background-color:white;" class="rowDiv"></div>
<%--导航模块--%>
<div class="rowDiv navigationDiv">
	<div class="standardDiv">
		<c:forEach items="${typeList}" var="aType">
			<A href="/movieList/t${aType.id}" class="navigationA" target="_blank">${aType.name}</A>
		</c:forEach>
	</div>
</div>

<%--主体部分，翻盖面板--%>
<div class="rowDiv" 
	style="margin-top:0px; padding-top:0px; padding-bottom:10px; cursor:pointer;"
	onmouseover="mouseOverFlipPanel()" 
	onmouseout="mouseOutFlipPanel()" 
	onclick="clickFlipPanel()"
>
	<%--翻盖面板图片显示之前--%>
	<div id="flipPanelShowBeforeDiv" style="height:400px; background-color:black;"></div>
	<%--翻盖面板图片--%>
	<c:forEach items="${flipPanelList}" varStatus="status" var="aFlipPanel">
		<div id="flipPanel_${status.index}" class="flipPanelDiv" 
			style="background-image:url(${aFlipPanel.logoPath}); background-color:${aFlipPanel.color};"
		>
			<%--翻盖面板自动渐变Div--%>
			<div id="flipPanelUp_${status.index}" style="height:100%; background-color:${aFlipPanel.color};"></div>
			<input id="flipPanelUrl_${status.index}" type="hidden" value="${aFlipPanel.url}"/>
		</div>
	</c:forEach>
	<input id="flipPanelCount" type="hidden" value="${fn:length(flipPanelList)}"/>
	<%--翻盖面板上层Div--%>
	<div style="position:absolute; height:400px;">
		<div class="standardDiv">
			<div style="background-image:url(/image/system/flipPanelList.png); background-repeat:no-repeat; width:247px; height:371px; margin-left:755px; margin-top:15px; padding-top:18px;">
				<c:forEach items="${flipPanelList}" varStatus="status" var="aFlipPanel">
					<div id="flipPanelName_${status.index}" 
						style="margin-left:20px; width:205px; line-height:34px;"
						onmouseover="mouseOverFlipPanelName(${status.index})"
					>
						<font style="margin-left:10px; color:white;">${aFlipPanel.name}</font>
					</div>
				</c:forEach>
			</div>
		</div>
	</div>
</div>
<div class="standardDiv">
	<%--小导航模块--%>
	<div style="margin-top:20px;">
		<div class="smallNavigationDiv" style="width:215px;">
			<div style="height:30px;">
				<font style="color:#999999;">年代</font>
			</div>
			<div>
				<c:forEach items="${yearList}" varStatus="status" var="aYear">
					<A href="/movieList/y${aYear.id}" class="smallNavigationA" style="margin-right:5px;" target="_blank" title="点击查看 ${aYear.name} 的电影">${aYear.name}</A>
					<c:if test="${status.count % 5 ==0}">
						<br/>
					</c:if>
				</c:forEach>
			</div>
		</div>
		<div class="smallNavigationDiv" style="margin-left:20px; width:145px;">
			<div style="height:30px;">
				<font style="color:#999999;">地区</font>
			</div>
			<div>
				<c:forEach items="${areaSortList}" varStatus="status" var="aAreaSort">
					<A href="/movieList/s${aAreaSort.id}" class="smallNavigationA" style="margin-right:5px;" target="_blank" title="点击查看 ${aAreaSort.name} 的电影">${aAreaSort.name}</A>
					<c:if test="${status.count % 3 ==0}">
						<br/>
					</c:if>
				</c:forEach>
			</div>
		</div>
		<div class="smallNavigationDiv" style="margin-left:20px; width:240px;">
			<div style="height:30px;">
				<font style="color:#999999;">导演</font>
			</div>
			<div>
				<c:forEach items="${directorList}" varStatus="status" var="aDirector">
					<A href="/movieList/d${aDirector.id}" class="smallNavigationA" style="margin-right:5px;" target="_blank" title="点击查看 ${aDirector.name} 导演电影">
						<%--最大长度为3--%>
						<c:choose>
							<c:when test="${fn:length(aDirector.name) > 3}">
								${fn:substring(aDirector.name,0,2)}..
							</c:when>
							<c:otherwise>
								${aDirector.name}
							</c:otherwise>
						</c:choose>
					</A>
					<c:if test="${status.count % 5 ==0}">
						<br/>
					</c:if>
				</c:forEach>
			</div>
		</div>
		<div class="smallNavigationDiv" style="margin-left:20px; width:240px;">
			<div style="height:30px;">
				<font style="color:#999999;">演员</font>
			</div>
			<div>
				<c:forEach items="${actorList}" varStatus="status" var="aActor">
					<A href="/movieList/a${aActor.id}" class="smallNavigationA" style="margin-right:5px;" target="_blank" title="点击查看 ${aActor.name} 参演电影">
						<%--最大长度为3--%>
						<c:choose>
							<c:when test="${fn:length(aActor.name) > 3}">
								${fn:substring(aActor.name,0,2)}..
							</c:when>
							<c:otherwise>
								${aActor.name}
							</c:otherwise>
						</c:choose>
					</A>
					<c:if test="${status.count % 5 ==0}">
						<br/>
					</c:if>
				</c:forEach>
			</div>
		</div>
		<div style="margin-left:20px; margin-top:55px; width:70px;">
			<A href="/movieList" class="smallNavigationA" target="_blank">更多筛选>></A>
		</div>
	</div>
	
	<%--最新电影模块--%>
	<div style="margin-top:30px;">
		<div>
			<font style="font-size:20px; font-weight:bold; color:#09F;">最新电影</font>
		</div>
		<div class="movieDiv">
			<c:forEach items="${newMovieTop18List}" varStatus="status" var="aNewMovie">
				<div class="itemDiv"
					<c:choose>
						<c:when test="${status.count % 6 == 0}">
							style="width:140px;"
						</c:when>
						<c:otherwise>
							 style="width:172px;"
						</c:otherwise>
					</c:choose>
				>
					<div class="borderDiv">
						<div style="height:185px; overflow:hidden; position:relative;">
							<A href="/movie/${aNewMovie.id}" target="_blank" title="点击查看电影 ${aNewMovie.name}">
								<img 
									<c:choose>
										<c:when test="${aNewMovie.logoPath == ''}">
											src="/image/system/defaultMovieLogo.png"
										</c:when>
										<c:otherwise> 
											src="${aNewMovie.logoPath}"
										</c:otherwise>
									</c:choose> 
								style="border:0px; width:140px;"/>
								<div class="logoChangeDiv"></div>
							</A>
						</div>
						<div style="background-color:white; text-align:center; height:45px;">
							<div style="margin-top:5px;">
								<A href="/movie/${aNewMovie.id}" target="_blank" class="nameA" title="${aNewMovie.name}">${aNewMovie.name}</A>
							</div>
							<div>
								<A href="/movie/${aNewMovie.id}" target="_blank" class="bynameA" title="${aNewMovie.byname}">${aNewMovie.byname}</A>
							</div>
						</div>
					</div>
				</div>
			</c:forEach>
		</div>
	</div>
	
	<c:if test="${fn:length(hotPlayMovieList) != 0}">
		<%--热播电影模块--%>
		<div style="margin-top:30px;">
			<div>
				<font style="font-size:20px; font-weight:bold; color:#09F;">热播电影</font>
			</div>
			<div class="movieDiv">
				<c:forEach items="${hotPlayMovieList}" varStatus="status" var="aHotPlayMovie">
					<div class="itemDiv"
						<c:choose>
							<c:when test="${status.count % 6 == 0}">
								style="width:140px;"
							</c:when>
							<c:otherwise>
								 style="width:172px;"
							</c:otherwise>
						</c:choose>
					>
						<div class="borderDiv">
							<div style="height:185px; overflow:hidden; position:relative;">
								<A href="/movie/${aHotPlayMovie.movieId}" target="_blank" title="点击查看电影 ${aHotPlayMovie.movieName}">
									<img 
										<c:choose>
											<c:when test="${aHotPlayMovie.movieLogoPath == ''}">
												src="/image/system/defaultMovieLogo.png"
											</c:when>
											<c:otherwise> 
												src="${aHotPlayMovie.movieLogoPath}"
											</c:otherwise>
										</c:choose> 
									style="border:0px; width:140px;"/>
									<div class="logoChangeDiv"></div>
								</A>
							</div>
							<div style="background-color:white; text-align:center; height:45px;">
								<div style="margin-top:5px;">
									<A href="/movie/${aHotPlayMovie.movieId}" target="_blank" class="nameA" title="${aHotPlayMovie.movieName}">${aHotPlayMovie.movieName}</A>
								</div>
								<div>
									<A href="/movie/${aHotPlayMovie.movieId}" target="_blank" class="bynameA" title="${aHotPlayMovie.movieByname}">${aHotPlayMovie.movieByname}</A>
								</div>
							</div>
						</div>
					</div>
				</c:forEach>
			</div>
		</div>
	</c:if>
	
	<c:if test="${fn:length(youLikeMovieList) != 0}">
		<%--猜你喜欢模块--%>
		<div style="margin-top:30px;">
			<div>
				<font style="font-size:20px; font-weight:bold; color:#09F;">猜你喜欢</font>
			</div>
			<div class="movieDiv">
				<c:forEach items="${youLikeMovieList}" varStatus="status" var="aYouLikeMovie">
					<div class="itemDiv"
						<c:choose>
							<c:when test="${status.count % 6 == 0}">
								style="width:140px;"
							</c:when>
							<c:otherwise>
								 style="width:172px;"
							</c:otherwise>
						</c:choose>
					>
						<div class="borderDiv">
							<div style="height:185px; overflow:hidden; position:relative;">
								<A href="/movie/${aYouLikeMovie.movieId}" target="_blank" title="点击查看电影 ${aYouLikeMovie.movieName}">
									<img 
										<c:choose>
											<c:when test="${aYouLikeMovie.movieLogoPath == ''}">
												src="/image/system/defaultMovieLogo.png"
											</c:when>
											<c:otherwise> 
												src="${aYouLikeMovie.movieLogoPath}"
											</c:otherwise>
										</c:choose> 
									style="border:0px; width:140px;"/>
									<div class="logoChangeDiv"></div>
								</A>
							</div>
							<div style="background-color:white; text-align:center; height:45px;">
								<div style="margin-top:5px;">
									<A href="/movie/${aYouLikeMovie.movieId}" target="_blank" class="nameA" title="${aYouLikeMovie.movieName}">${aYouLikeMovie.movieName}</A>
								</div>
								<div>
									<A href="/movie/${aYouLikeMovie.movieId}" target="_blank" class="bynameA" title="${aYouLikeMovie.movieByname}">${aYouLikeMovie.movieByname}</A>
								</div>
							</div>
						</div>
					</div>
				</c:forEach>
			</div>
		</div>
	</c:if>
</div>
<jsp:include page="/include/pageBottom" flush="true"/>
</body>
<script type="text/javascript">
	
	<%--翻盖面板编号 初始化时为最后一个--%>
	var flipPanelNo = parseInt($("#flipPanelCount").val())-1;
	
	<%--改变翻盖面板的时间--%>
	var changeFlipPanelTime = 5000;
	
	<%--改变翻盖面板的时间在外--%>
	var changeFlipPanelTimeout;
	
	<%--自动改变翻盖面板--%>
	function autoChangeFlipPanel(){
		var flipPanelCount = parseInt($("#flipPanelCount").val());
		
		var autoNo = flipPanelNo + 1;
		if(autoNo >= flipPanelCount){
			autoNo = 0;
		}
		
		<%--调用改变翻盖面板--%>
		changeFlipPanel(autoNo);
		
		<%--定时自调用--%>
		changeFlipPanelTimeout = setTimeout("autoChangeFlipPanel()",changeFlipPanelTime);
	}
	
	<%--改变翻盖面板--%>
	function changeFlipPanel(no){
		<%--如果编号改变了--%>
		if(flipPanelNo != no){
			$("#flipPanel_"+flipPanelNo).css("display","none");
			$("#flipPanelName_"+flipPanelNo).css("background-color","");
			$("#flipPanelName_"+flipPanelNo).css("width","205px");
			$("#flipPanelName_"+flipPanelNo).css("line-height","34px");
			$("#flipPanelName_"+flipPanelNo).css("border","");
			
			
			$("#flipPanel_"+no).css("display","block");
			$("#flipPanelName_"+no).css("background-color","#0077D3");
			$("#flipPanelName_"+no).css("width","203px");
			$("#flipPanelName_"+no).css("line-height","32px");
			$("#flipPanelName_"+no).css("border","1px solid white");
			flipPanelNo = no;
			
			<%--调用显示翻盖面板--%>
			showFlipPanel(no,1);
		}
	}
	
	<%--显示翻盖面板--%>
	function showFlipPanel(no,opacity){
		$("#flipPanelUp_"+no).css("opacity",opacity);
		opacity -= 0.1;
		if(opacity > 0){
			setTimeout("showFlipPanel("+no+","+opacity+")",30);
		}
	}
	
	<%--鼠标在翻盖面板--%>
	function mouseOverFlipPanel(){
		<%--清除翻盖面板时间函数--%>
		clearTimeout(changeFlipPanelTimeout);
	}
	
	<%--鼠标离开翻盖面板--%>
	function mouseOutFlipPanel(){
		<%--定时调用自动翻盖面板--%>
		changeFlipPanelTimeout = setTimeout("autoChangeFlipPanel()",changeFlipPanelTime);
	}
	
	<%--点击翻盖面板--%>
	function clickFlipPanel(){
		var flipPanelUrl = $("#flipPanelUrl_"+flipPanelNo).val();
		window.open(flipPanelUrl);
	}
	
	<%--鼠标在翻盖面板名称上--%>
	function mouseOverFlipPanelName(no){
		changeFlipPanel(no);
	}
	
	<%--初始化调用自动翻盖面板--%>
	autoChangeFlipPanel();
	
	<%--隐藏滚动面板显示前Div--%>
	$("#flipPanelShowBeforeDiv").css("display","none");
</script>
</html>
